package com.jms.model.sys;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.jms.model.base.IdEntity;

@Entity
@Table(name = "sys_plan")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Tplan extends IdEntity implements java.io.Serializable {

	private String name; // 计划任务名称
	private String description; // 描述
	
	private Date time;//当为定时运行模式时，什么时间运行
	private Date lastrun;//上次运行时间
	private Date nextrun;//下次运行时间
	private Integer mode;//1为定时运行 2为循环运行 3为定时循环运行
	
	private Date starttime;//任务开始时间
	private String pinterval;//当为循环任务模式时，间隔多少分钟
	private Integer times;//当为循环任务模式时，任务最多执行多少次（后停止）
	private Integer already;//当为循环任务模式时，任务运行次数
	private Date endtime;//任务结束时间
	
	private String day;//当定时循环模式运行时，在每个月的几号运行（以英文逗号隔开）
	private String weekday;//当定时循环模式运行时，在每周的周几运行（以英文逗号隔开）
	private String hour;//当定时循环模式运行时，在每天的几时运行（以英文逗号隔开）
	private String minute;//当定时循环模式运行时，在每小时的哪个时间段运行（以英文逗号隔开）
	private Integer disabled;//任务是否已禁用 0为未禁用 1为已禁用
	
	private String controller;
	private String action;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Date getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = time;
	}
	public Date getLastrun() {
		return lastrun;
	}
	public void setLastrun(Date lastrun) {
		this.lastrun = lastrun;
	}
	public Date getNextrun() {
		return nextrun;
	}
	public void setNextrun(Date nextrun) {
		this.nextrun = nextrun;
	}
	public Integer getMode() {
		return mode;
	}
	public void setMode(Integer mode) {
		this.mode = mode;
	}
	public Date getStarttime() {
		return starttime;
	}
	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}
	
	public String getPinterval() {
		return pinterval;
	}
	public void setPinterval(String pinterval) {
		this.pinterval = pinterval;
	}
	public Integer getTimes() {
		return times;
	}
	public void setTimes(Integer times) {
		this.times = times;
	}
	public Integer getAlready() {
		return already;
	}
	public void setAlready(Integer already) {
		this.already = already;
	}
	public Date getEndtime() {
		return endtime;
	}
	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}
	public String getDay() {
		return day;
	}
	public void setDay(String day) {
		this.day = day;
	}
	public String getWeekday() {
		return weekday;
	}
	public void setWeekday(String weekday) {
		this.weekday = weekday;
	}
	public String getHour() {
		return hour;
	}
	public void setHour(String hour) {
		this.hour = hour;
	}
	public String getMinute() {
		return minute;
	}
	public void setMinute(String minute) {
		this.minute = minute;
	}
	public Integer getDisabled() {
		return disabled;
	}
	public void setDisabled(Integer disabled) {
		this.disabled = disabled;
	}
	public String getController() {
		return controller;
	}
	public void setController(String controller) {
		this.controller = controller;
	}
	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}
	
	
	
}
